/*
 * @Author: hmhvictory 1400628624@qq.com
 * @Date: 2025-08-01 16:06:12
 * @LastEditors: hmhvictory 1400628624@qq.com
 * @LastEditTime: 2025-08-01 16:06:29
 * @FilePath: \Gitee实训笔记\day15\Homework\test01\test02\Floater.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day15.test02;

// 临时工类
class Floater extends Employee {
    private int workHours;

    public Floater(String name, String gender, String birthDate, int workHours) {
        super(name, gender, birthDate);
        this.workHours = workHours;
    }

    @Override
    public void computeSalary() {
        // 每小时工资为 50 元
        double salary = workHours * 50;
        System.out.println("临时工 " + getName() + " 本月工资为 " + salary + " 元。");
    }
}

